package org.misty.seckill.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.misty.seckill.vo.SGoodsVo;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface GoodsDao {
  List<SGoodsVo> listSecKills();

  SGoodsVo getDetailBySid(long id);

  SGoodsVo getDetailByOid(long orderId);

  int decrStock(@Param("id") long id, @Param("count") int count);

  int resetStock(@Param("total") int total);
}
